<p class="Head1"><help:link Id="66520">TimeSerial Function [Runtime]</help:link></p>
<p class="Paragraph">Calculates a serial time value from the specified hour, minute, and second - parameters passed as numeric values - that represents the time in a single numeric value. This value can be used to calculate the difference between times.</p>
<p class="Paragraph">hour: Any integer expression that indicates the hour of the time, from which to determine the serial time value. Valid values: 0-23.</p>
<p class="Paragraph">minute: Any integer expression that indicates the minute of the time, from which to determine the serial time value. Normally you can use values between 0 and 59 here. However, values outside of this range are also possible. In this case the minute influences the hour.</p>
<p class="Paragraph">second: Any integer expression that indicates the second of the time, from which to determine the serial time value. Normally you can use values between 0 and 59 here. However, values outside of this range are also possible. In this case the second influences the minute.</p>
<p class="Paragraph">Examples:</p>
<p class="Paragraph">12, -5, 45 corresponds to 11, 55, 45</p>
<p class="Paragraph">12, 61, 45 corresponds to 13, 2, 45</p>
<p class="Paragraph">12, 20, -2 corresponds to 12, 19, 58</p>
<p class="Paragraph">12, 20, 63 corresponds to 12, 21, 4</p>
<p class="Paragraph">With this function, you can convert any time into a single value, with which you can calculate time differences.</p>
<p class="Paragraph">The TimeSerial function returns the type Variant with VarType 7 (Date); this value is stored internally as a double-precision number between 0 and 0.9999999999. As opposed to the DateSerial or DateValue function, in which serial date values are calculated resulting in days relative to a fixed date, you can calculate with values returned by the TimeSerial function, but you cannot evaluate them.</p>
<p class="Paragraph">In the TimeValue function, you can pass a string as a parameter containing the time. For the TimeSerial function, however, you can pass the individual parameters (hour, minute, second) as separate numeric expressions.</p>
<p class="P2">Example:</p>
<p class="PropText">Sub ExampleTimeSerial</p>
<p class="PropText">Dim dDate As Double, sDate As String</p>